package ccnu.agile.strategy.restrequest;

import ccnu.agile.enums.CMethod;
import org.aspectj.lang.JoinPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Description: rest 请求参数策略环境类
 * @Author: JreamY
 * @Date: 2021/11/4
 **/
@Component
public class RestRequestContext {

    @Autowired
    private Map<String, IRestRequestStrategy> container;

    public void restRequest(JoinPoint point, CMethod cMethod) {
        container.get(cMethod.getRestRequestStrategy()).restRequest(point);
    }
}
